#pragma once

#include "KnowledgeBaseWriterInterface.h"
#include "Localization.h"
#include "TextStreamInterface.h"

class KnowledgeBaseWriterFile;
typedef Factory < KnowledgeBaseWriterInterface >::CastedPtr < KnowledgeBaseWriterFile > KnowledgeBaseWriterFilePtr;

class KnowledgeBaseWriterFile
: public KnowledgeBaseWriterInterface
{
	friend class Factory < KnowledgeBaseWriterInterface >;
public:
	static KnowledgeBaseWriterInterfacePtr Spawn ( TextStreamInterfacePtr textStream );
	static void CheckInnocence ();
	
private:
	KnowledgeBaseWriterFile ();
	virtual void Write ( KnowledgeBaseMemoryInterfacePtr memory );
	
private:
	static Factory < KnowledgeBaseWriterInterface > factory;
	TextStreamInterfacePtr textStream;
};

